package pers.xx.sbm.vo;

import lombok.Getter;
import lombok.Setter;

/**
 * @author ：xiexing
 * @description： 角色样本原始数据vo类
 * @date ：2021/12/15 14:46
 */
@Getter
@Setter
public class RoleSampleVo {
    private String xd;
    private Integer studentNum;//学生数量统计
    private Double studentPercent;//学生所占比例
    private Integer teacherNum;//老师数量统计
    private Double teacherPercent;//老师所占比例
    private Integer parentNum;//家长数量
    private Double parentPercent;//家长所占比例
    private Integer yzNum;//园长数量
    private Double yzPercent;//园长所占比例
    private Integer rddbNum;//人大代表/政协委员数量
    private Double rddbPercent;//人大代表/政协委员比例
    private Integer allNum = 0;//各个角色数量统计

    /**
     * @description 设置数据
     * @author XieXing
     * @date 2021/12/15 16:06
     */
    public void setData() {

        if (this.studentNum != null) {
            this.allNum += this.studentNum;
        }

        if (this.teacherNum != null) {
            this.allNum += this.teacherNum;
        }
        if (this.parentNum != null) {
            this.allNum += this.parentNum;
        }
        if (this.yzNum != null) {
            this.allNum += this.yzNum;
        }
        if (this.rddbNum != null) {
            this.allNum += this.rddbNum;
        }


    }
}
